<?
/**
 * FileManagerBuilder
 * @author King Beto <apardo@adverit.com>
 * @copyright  2005 - AdVerit S.A. <www.adverit.com>
 * @version 1.0
 * @package database
 * @update     03/01/2006 03:09p.m.
 */

class FileManagerBuilder
{
    protected $_photoAlbumClass = 'FileManagerPhotoAlbum';
    protected $_photoMediaClass = 'FileManagerMediaLibrary';
    protected $_filemManagerClass = 'FileManager';
    
	public function &build($type = NULL, $options = NULL)
	{
		switch($type)
		{
			case "photoAlbum":
			    $c = $this->_photoAlbumClass;
				$fm = new $c($options);
				$fm->setDisplayer('default');
				break;
			case "mediaLibrary":
    			$c = $this->_photoMediaClass;
				$fm = new $c($options);
				$fm->setDisplayer('photoalbum');
				break;
			default: 
			    $c = $this->_filemManagerClass;
			    $fm = new $c($options);
		}
		return $fm;
	}
}

?>
